package io.renren.common.enums;

public enum  SongType {
    one {
        public Integer getValue() {
            return 1;
        }

    public String getName() {
        return "考级";
    }

},
        two {

public Integer getValue() {
        return 2;
        }

public String getName() {
        return "流行";
        }

        },
    three {

        public Integer getValue() {
            return 3;
        }

        public String getName() {
            return "古典";
        }

    };

// 声明抽象方法
public abstract Integer getValue();

public abstract String getName();
/**
 * 获取
 * @param type
 * @return
 */
public static String getNameByValue(Integer type) {
        String name = "";
        if(type != null) {
        for (SongType c : SongType.values()) {
        if (c.getValue().intValue() == type.intValue()) {
        name = c.getName();
        break;
        }
        }
        }
        return name;

        }
}
